One day Pugs stopped building on my home machine (Win32). It blew up during the build process when it got to Prelude.hs
It happened to coincide with a known problem with Prelude.hs and another patch that pretty much broke everything else.
After those issues resolved - it continued to be b0rk. I tried EVERYTHING - no avail.
Just as I was about to give up, I remembered having deleted the perl.exe in the root directory of GHC.
You see, I have everything Pugs related under a single umbrella. GHC shipped with a perl56.dll and perl.exe which was interfering with my 5.8.7 perl since . takes precedence over anything in %PATH on Win32. I tried a few things after deleting it and everything appeared to work normally - to include GHC.
So since I hadn't just renamed the files and I didn't want to re-install GHC to test if that was the problem. I just copied the 5.8.7 dll and exe to the GHC root directory and what do you know - it worked.
Why is GHC hard coded to look for a perl in its root directory? Why would the error message not be more descriptive 0x01 or some such thing? I don't know, but problem SOLVED!